package com.ap.core.common.types;


/**
 * User: Ranjit.Singh
 * Transaction Restriction Type used in AP
 */
public enum TransactionRestrictionType {

    PLUS16("16PLUS"),
    PLUS18("18PLUS"),
    PLUS25("25PLUS");


    private String txRestriction;

    private TransactionRestrictionType(String txCRestricition) {
        this.txRestriction = txCRestricition;
    }


    public static TransactionRestrictionType getTransactionRestrictionType(String txRestriction) {
        for (TransactionRestrictionType transactionRestrictionType : values()) {
            if (transactionRestrictionType.txRestriction.equals(txRestriction)) {
                return transactionRestrictionType;
            }
        }
        // not found
        throw new IllegalArgumentException("Unable to determine Transaction Restriction Type: txRestriction= " + txRestriction);
    }


	/**
	 * @return the txRestriction
	 */
	public String getTxRestriction() {
		return txRestriction;
	}
    
    

}
